<!--
 * @Date: 2025-01-09 15:18:40
 * @Author: LiSong
 * @LastEditors: LiSong
 * @LastEditTime: 2025-01-09 17:32:55
 * @Description: 
-->
<template>
  <div class="slot-file-panel">
    <div class="slot-file-panel-head">

    </div>
    <div class="slot-file-panel-body">
      <div class="body-item-left">
        <div class="left-tree">
          <FileRuleTree
            :="treeAttrs"
            @nodeChange="nodeChange"
          />
        </div>
        
      </div>
      <div class="body-item-right">
        <div class="body-right-container">
          <div class="assist-file-table">
            RIGHT
          </div>
        </div>
      </div>
    </div>
    
  </div>
</template>

<script setup>

import { reactive, useAttrs } from 'vue';

import FileRuleTree from '../comps/FileRuleTree.vue'

const attrs = useAttrs()
console.log(attrs)

const treeAttrs = reactive({
  busiId: attrs.busiId,
  busiType: attrs.busiType
})

const nodeChange = (data) => {
  console.log('nodeChange', data)
}

</script>

<style lang="scss" scoped>
$borderColor: rgb(233, 233, 233);
$backgroundColor: rgb(233, 237, 246);
$whiteBackgroundColor: #fff;

.slot-file-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  &-head {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    border-top: 1px solid #ececec;
    .header-item {
      flex: 1;
      height: 100%;
      display: flex;
      &.left {
        justify-content: left;
      }
    }
    .header-search {
      display: flex;
      align-items: center;
      .file-number-desc {
        margin-left: 15px;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        .desc-icon {
          margin-right: 5px;
        }
      }
    }
  }
  &-body {
    flex: 1;
    border-top: 1px solid #ececec;
    min-height: 100px;
    display: flex;
    background: rgb(233, 237, 246);
    .body-item-left {
      width: 320px;
      height: 100%;
      padding: 10px;
      padding-right: 0;
      .body-left-container {
        width: 100%;
        height: 100%;
        padding: 8px;
        overflow: auto;
        border-radius: 5px;
        background-color: #fff;
      }
      .left-tree {
        width: 100%;
        height: 100%;
        overflow: auto;
        border: 1px solid $borderColor;
        border-radius: 5px;
      }
      .rule-tree {
        width: 100%;
        // padding: 8px;
        // border-radius: 5px;
        :deep(.el-tree-node__content) {
          .el-tree-node__expand-icon.is-leaf {
            width: 0.5em;
            padding: 0;
          }
        }
      }
    }
    .body-item-right {
      flex: 1;
      height: 100%;
      padding: 10px;
      .body-right-container {
        height: 100%;
        padding: 8px;
        border-radius: 5px;
        background-color: #fff;
        display: flex;
        flex-direction: column;
      }
      .assist-file-table {
        flex: 1;
        min-height: 100px;
        width: 100%;
      }
      .assist-file-upload {
        height: 200px;
        width: 100%;
        margin-top: 20px;
        background-color: #fff;
        border-radius: 4px;
        border: 1px dashed $borderColor;
        padding: 10px;
        :deep(.el-upload-dragger) {
          padding: 10px;
        }
        .upload-tips {
          padding-top: 10px;
          display: block;
          width: 100%;
          white-space: nowrap;
        }
      }
    }
    .tree-content {
      overflow: hidden;
      width: 100%;
      // padding-top: 10px;
      // padding-bottom: 10px;
      padding-right: 6px;
      .tree-content-body {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
        .contain-star {
          position: absolute;
          color: red;
          left: -1px;
          top: 3px;
        }
        .contain-lable {
          flex: 1;
          padding-right: 10px;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
          -o-text-overflow: ellipsis;
        }
        .contain-check {
          color: #40c475;
        }
      }
    }
  }
}
</style>